package com.scholarship.modules.admin.dto;

import lombok.*;

import java.util.List;

/**
 * @Author Z.J.H
 * @create 2021/4/14 14:52
 */
//list查询条件Dto
public class QueryDto<T> {
    //private String orderByField;   //排序字段
    //private Boolean isAsc;  //是否为升序
    private Integer pageNum;    //页码
    private Integer pageSize;   //每页显示数量
    private String searchStr;   //搜索框字符串
    private T query;   //查询条件

    public Integer getPageNum() {
        return pageNum;
    }

    public QueryDto<T> setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public QueryDto<T> setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    public String getSearchStr() {
        return searchStr;
    }

    public QueryDto<T> setSearchStr(String searchStr) {
        this.searchStr = searchStr;
        return this;
    }

    public T getQuery() {
        return query;
    }

    public QueryDto<T> setQuery(T query) {
        this.query = query;
        return this;
    }

    @Override
    public String toString() {
        return "QueryDto{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", searchStr='" + searchStr + '\'' +
                ", query=" + query +
                '}';
    }
}
